package com.xxxy;

import com.xxxy.blockhandler.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
// 添加 Sentinel 注解导入
import com.alibaba.csp.sentinel.annotation.SentinelResource;

@RestController
public class MonitorController {

    @GetMapping(value ="/monitor/hello")
    @SentinelResource(value = "helloResourse", blockHandler = "helloBlockHandler",
            blockHandlerClass = MonitorBlockHandler.class)
    public String helo() {
        return "hello";
    }
    @GetMapping(value ="/associate")
    public String associate() {
        return "我是关联接口";
    }
}
